/**
	Base class for any object acting as a datasource for a {@link GridView} object.


	@author Chandler McWilliams
	@version 1.0
	@version 2006-11-29

**/
class timber.ui.GridViewContent
{
	private var data:Array;
	
	public function GridViewContent(aArray) {
		data = aArray;
	}
	
/**

	Returns the number of cells in the grid

	When the grid's render method is called, the grid asks
	the data source for the number of cells the grid needs to draw.
	The most basic implementation of this method would be to return the length
	of an array containing the data for the grid.
	
	@param grid The grid making the request.
	@return (Number) Number of rows.
**/

	public function get length():Number {
		return data.length;
	}
	
/**

	Returns the object for a specific cell of the grid.
	
	When a grid adds a cell, it grabs the data object for that cell and passes it on to the cell prototype.
	@param cell The field name to lookup a value for.
	@return (Object) Value for this cell in the grid
**/
	public function objectForCell(cell):Object {
		return data[cell];
	}

	public function getData(Void):Object {
		return data;
	}
}